﻿using Text.Model;
using Text.Model.Shop;
using Text.Model.ShopModel;

namespace Text.IBll
{
    public interface IAdminBll
    {
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="t">某个实体</param>
        /// <returns>受影响行数</returns>
        Task<int> ADD(AdminModel t);
        /// <summary>
        /// 显示列表
        /// </summary>
        /// <param name="exp">查询条件</param>
        /// <returns>返回显示的数据</returns>
         


        //====================================门店==========================================//



        /// <summary>
        /// 地址显示
        /// </summary>
        /// <returns></returns>
        IQueryable<Address> GetAddr();
        /// <summary>
        /// 门店添加
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>
        Task<int> ShopAdd(ShopModel t);
        /// <summary>
        /// 显示查询
        /// </summary>
        /// <param name="name"></param>
        /// <param name="min"></param>
        /// <param name="max"></param>
        /// <param name="da1"></param>
        /// <param name="da2"></param>
        /// <returns></returns>

        IQueryable<AdminModel> GetModel(string name, int? min = null, int? max = null, DateTime? da1 = null, DateTime? da2 = null);
        /// <summary>
        /// 显示列表
        /// </summary>
        /// <param name="totalcount">总条数</param>
        /// <param name="totalpage">总页数</param>
        /// <param name="pageindex">页码</param>
        /// <param name="pagesize">也容量</param>
        /// <param name="shopName">门店名称</param>
        /// <param name="address">门店地址</param>
        /// <returns></returns>
        IQueryable<ShopDTO> GetShop(out int totalcount,out int totalpage ,int pageindex=1,int pagesize=2,string?shopName="",int? address=null);
    }
}
